<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Member_coupon_his.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Member_coupon_his.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '优惠券总列表',
                    name: 'Member_coupon_his',
                    url: "/MebCouponhis/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {},
                editFormOptions: [],
                searchFormFields: {"couponid":"","member_name":"","get_type":"","use_status":"","use_endtime":"","use_starttime":"","coupon_make_name":""},
                searchFormOptions: [
                    [
                      {"title":"制券名称","field":"coupon_make_name","type":"like"},
                      {"title":"优惠券id","field":"couponid"},
                      {"title":"优惠券模板","field":"couponcode","type":"select","dataKey":'coupontype',"data":[]},  
                    {"title":"使用状态","field":"use_status","type":"select","dataKey":'MebHisUseStatus',"data":[]}],
                    [
                      {"title":"领取人名称","field":"member_name"},
                      {"title":"开始使用时间","field":"use_starttime","type":"datetime"},
                      {"title":"结束使用时间","field":"use_endtime","type":"datetime"},
                      {"title":"券包","field":"member_coupon_tag_id","type":"select","dataKey":"","data":[]},
                    ]],
                columns: [
                        {field:'coupon_make_name',title:'制券名称',type:'int',width:180,align:'left'},
                       {field:'couponid',title:'优惠券id',type:'int',width:210,align:'left',sortable:true},
                       {field:'couponcode',title:'优惠券模板',type:'string',width:170,align:'left',bind:{key:"coupontype",data:[]}},
                    //    {field:"md5key",title:'md5key',type:'int',width:190,align:'left',sortable:true},
                       {field:'use_status',title:'使用状态',type:'int',width:90,align:'left',bind:{key:"MebHisUseStatus",data:[]}},
                       {field:'memberid',title:'手机号',type:'int',width:120,align:'left'},
                       {field:'member_name',title:'领取人名称',type:'string',width:90,align:'left'},
                       {field:'orderid',title:'订单id',type:'string',width:90,align:'left'},
                       {field:'ordersn',title:'订单码',type:'string',width:90,align:'left'},
                       {field:'use_starttime',title:'开始使用时间',type:'datetime',width:170},
                       {field:'use_endtime',title:'结束使用时间',type:'datetime',width:170},
                       {field:'receive_starttime',title:'开始领取时间',type:'datetime',width:170},
                       {field:'receive_endtime',title:'结束领取时间',type:'datetime',width:170},
                       {field:'card_day',title:'有效期固定天数',type:'datetime',width:170},
                       {field:'creator',title:'创建人',type:'string',width:80,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:170}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>